<include file="Public:header"/>
<link rel="stylesheet" href="__WEBPUBLIC__/Uploadify/uploadify.css" type="text/css" />
<div id="main-content" class="content">
    <ul class="breadcrumb">
        <li><a href="/">首页</a></li>
        <li class="active"><a href="">项目管理</a></li>
        <li class="active">编辑项目</li>
    </ul>
    <div class="page-header clearfix">
        <h3>项目管理</h3>
        <ul class="nav nav-tabs">    
            <li>
                <a href="{:U('Project/selectProject')}">项目列表</a>
            </li>
            <li  class="active">
                <a href="{:U('Project/editProject')}">编辑项目</a>
            </li>
        </ul>
    </div>

    <div class="content-box-table">
        <form action="{:U('Project/editProject')}" method="post" class="form-horizontal" role="form" enctype="multipart/form-data">
            <input type="hidden" value="{$project_find['p_id']}" name="p_id" />
            <div class="form-group">
                <label for="p_name" class="col-sm-3 control-label">项目名称：</label>
                <div class="col-sm-9">
                  <input type="text" class="form-control" id="p_name" name="p_name" value="{$project_find['p_name']}">
                </div>
            </div>
            <div class="form-group">
                <label for="p_api_head" class="col-sm-3 control-label">API链接：</label>
                <div class="col-sm-9">
                  <input type="text" class="form-control" id="p_api_head" name="p_api_head" value="{$project_find['p_api_head']}">
                </div>
            </div>
            <div class="form-group">
                <label for="p_api_head" class="col-sm-3 control-label">客户列表：</label>
                <div class="col-sm-9">
                <volist name="member_list" id="vo" mod="10">
                    <input type="radio" value="{$vo.m_id}" name="own_m_id" class="own_m_id" <eq name="vo['m_id']" value="$project_find['own_m_id']">checked</eq>/>&nbsp;{$vo['m_nickname']}&nbsp;&nbsp;&nbsp;&nbsp;
                </volist>
                </div>
            </div>
            <div class="form-group">
                <label for="" class="col-sm-3 control-label">项目封面：</label>
                <div class="col-sm-9" id="plogo">
                    <script>
                        function PreviewImage1(imgFile)
                        {
                            var filextension=imgFile.value.substring(imgFile.value.lastIndexOf("."),imgFile.value.length);
                            filextension=filextension.toLowerCase();
                            if ((filextension!='.jpg')&&(filextension!='.gif')&&(filextension!='.jpeg')&&(filextension!='.png')&&(filextension!='.bmp'))
                            {
                                alert("对不起，系统仅支持标准格式的照片，请您调整格式后重新上传，谢谢 !");
                                imgFile.focus();
                            }
                            else
                            {
                                var path;
                                if(document.all)//IE
                                {
                                    imgFile.select();
                                    path = document.selection.createRange().text;
                                    document.getElementById("imgPreview1").innerHTML="";
                                    document.getElementById("imgPreview1").style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',sizingMethod='scale',src=\"" + path + "\")";//使用滤镜效果
                                }
                                else//FF
                                {
                                    path=window.URL.createObjectURL(imgFile.files[0]);// FF 7.0以上
                                    //path = imgFile.files[0].getAsDataURL();// FF 3.0
                                    document.getElementById("imgPreview1").innerHTML = "<img id='img1'src='"+path+"' style='width:100px;height:100px'/>";
                                    //document.getElementById("img1").src = path;
                                }
                            }
                        }
                    </script>
                    <div class="uplode-pic fl">
                        <div id="imgPreview1">
                            <img src="/Uploads/{$project_find['p_logo']}" alt="" style="width: 150px;height: auto">
                        </div>
                        <input type="file" onchange='PreviewImage1(this)' name="p_logo"/>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-3 col-sm-9">
                  <button type="submit" class="btn btn-default btn-primary">确认修改</button>
                </div>
            </div>
        </form>

        <div class="modal-body">
            <form action="{:U('Project/exportExcel')}" method="post">
                <!-- 选择字段 -->
                <div style="line-height: 30px;">
                    <input type="checkbox" value="项目名称||p_name" name="fields_data[]" checked/>&nbsp;项目名称　
                    <input type="checkbox" value="模块名称||mo_name" name="fields_data[]" checked/>&nbsp;模块名称　
                    <input type="checkbox" value="方法名称||f_zh_name" name="fields_data[]" checked/>&nbsp;方法名称　
                    <input type="checkbox" value="接口URL||f_url" name="fields_data[]" checked/>&nbsp;接口URL　
                    <input type="checkbox" value="传递方式||f_type" name="fields_data[]" checked/>&nbsp;传递方式　
                    <input type="checkbox" value="参数名称||pa_name" name="fields_data[]" checked/>&nbsp;参数名称　
                    <input type="checkbox" value="参数类型||p_type" name="fields_data[]" checked/>&nbsp;参数类型　
                    <input type="checkbox" value="能否为空||p_is_null" name="fields_data[]" checked/>&nbsp;能否为空　
                    <input type="checkbox" value="参数描述||p_desc" name="fields_data[]" checked/>&nbsp;参数描述　


                    <input type="checkbox" value="成功返回||f_success" name="fields_data[]" checked/>&nbsp;成功返回　
                    <input type="checkbox" value="失败返回||f_error" name="fields_data[]" checked/>&nbsp;失败返回　
                </div>
                <div style="margin-top:20px;">
                    <input type="submit" class="btn btn-grren" value="确认导出" onclick="face_hide()">　
                    <span class='prompt'>(导出数据为当前筛选条件下的所有数据)</span>
                </div>
                <!-- 筛选条件 -->
                <div style="display: none">
                    <input type="text" name="m_id" value="{$request['m_id']}"/>　
                    <input type="text" name="m_nickname" value="{$request['m_nickname']}"/>　
                    <select name="m_sex">
                        <option value=""></option>
                        <option value="1" <if condition="$request['m_sex'] eq 1">selected=true</if>></option>
                        <option value="2" <if condition="$request['m_sex'] eq 2">selected=true</if>></option>
                    </select>　
                    <select name="sort_order">
                        <option value=""></option>
                        <option value="m_score:asc" <if condition="$request['sort_order'] eq 'm_score:asc'">selected=true</if>></option>
                        <option value="m_score:desc" <if condition="$request['sort_order'] eq 'm_score:desc'">selected=true</if>></option>
                    </select>
                </div>
            </form>
        </div>

    </div>


</div>

<include file="Public:footer"/>